diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
index 1c4aa3f..31c9344 100644
--- a/arch/sandbox/cpu/os.c
+++ b/arch/sandbox/cpu/os.c
@@ -385,7 +385,7 @@
 	return os_dirent_typename[OS_FILET_UNKNOWN];
 }
 
-ssize_t os_get_filesize(const char *fname)
+int os_get_filesize(const char *fname, loff_t *size)
 {
 	struct stat buf;
 	int ret;
@@ -393,7 +393,8 @@
 	ret = stat(fname, &buf);
 	if (ret)
 		return ret;
-	return buf.st_size;
+	*size = buf.st_size;
+	return 0;
 }
 
 void os_putc(int ch)
@@ -427,11 +428,11 @@
 {
 	struct sandbox_state *state = state_get_current();
 	int fd, ret;
-	int size;
+	loff_t size;
 
-	size = os_get_filesize(fname);
-	if (size < 0)
-		return -ENOENT;
+	ret = os_get_filesize(fname, &size);
+	if (ret < 0)
+		return ret;
 	if (size != state->ram_size)
 		return -ENOSPC;
 	fd = open(fname, O_RDONLY);
diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c
index 59adad6..ba73b7e 100644
--- a/arch/sandbox/cpu/state.c
+++ b/arch/sandbox/cpu/state.c
@@ -49,14 +49,14 @@
 
 static int state_read_file(struct sandbox_state *state, const char *fname)
 {
-	int size;
+	loff_t size;
 	int ret;
 	int fd;
 
-	size = os_get_filesize(fname);
-	if (size < 0) {
+	ret = os_get_filesize(fname, &size);
+	if (ret < 0) {
 		printf("Cannot find sandbox state file '%s'\n", fname);
-		return -ENOENT;
+		return ret;
 	}
 	state->state_fdt = os_malloc(size);
 	if (!state->state_fdt) {
diff --git a/common/board_f.c b/common/board_f.c
index d4d25d7..c6e38f3 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -287,7 +287,7 @@
 	struct sandbox_state *state = state_get_current();
 	const char *fname = state->fdt_fname;
 	void *blob;
-	ssize_t size;
+	loff_t size;
 	int err;
 	int fd;
 
@@ -300,10 +300,10 @@
 		return -EINVAL;
 	}
 
-	size = os_get_filesize(fname);
-	if (size < 0) {
+	err = os_get_filesize(fname, &size);
+	if (err < 0) {
 		printf("Failed to file FDT file '%s'\n", fname);
-		return -ENOENT;
+		return err;
 	}
 	fd = os_open(fname, OS_O_RDONLY);
 	if (fd < 0) {
diff --git a/fs/sandbox/sandboxfs.c b/fs/sandbox/sandboxfs.c
index ba6402c..d11c087 100644
--- a/fs/sandbox/sandboxfs.c
+++ b/fs/sandbox/sandboxfs.c
@@ -13,10 +13,10 @@
 	return 0;
 }
 
-long sandbox_fs_read_at(const char *filename, unsigned long pos,
-			     void *buffer, unsigned long maxsize)
+int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,
+		       loff_t maxsize, loff_t *actread)
 {
-	ssize_t size;
+	loff_t size;
 	int fd, ret;
 
 	fd = os_open(filename, OS_O_RDONLY);
@@ -27,16 +27,31 @@
 		os_close(fd);
 		return ret;
 	}
-	if (!maxsize)
-		maxsize = os_get_filesize(filename);
+	if (!maxsize) {
+		ret = os_get_filesize(filename, &size);
+		if (ret) {
+			os_close(fd);
+			return ret;
+		}
+
+		maxsize = size;
+	}
+
 	size = os_read(fd, buffer, maxsize);
 	os_close(fd);
 
-	return size;
+	if (size < 0) {
+		ret = -1;
+	} else {
+		ret = 0;
+		*actread = size;
+	}
+
+	return ret;
 }
 
-long sandbox_fs_write_at(const char *filename, unsigned long pos,
-			 void *buffer, unsigned long towrite)
+int sandbox_fs_write_at(const char *filename, loff_t pos, void *buffer,
+			loff_t towrite, loff_t *actwrite)
 {
 	ssize_t size;
 	int fd, ret;
@@ -52,7 +67,14 @@
 	size = os_write(fd, buffer, towrite);
 	os_close(fd);
 
-	return size;
+	if (size == -1) {
+		ret = -1;
+	} else {
+		ret = 0;
+		*actwrite = size;
+	}
+
+	return ret;
 }
 
 int sandbox_fs_ls(const char *dirname)
@@ -74,15 +96,23 @@
 
 int sandbox_fs_exists(const char *filename)
 {
-	ssize_t sz;
+	loff_t size;
+	int ret;
 
-	sz = os_get_filesize(filename);
-	return sz >= 0;
+	ret = os_get_filesize(filename, &size);
+	return ret == 0;
 }
 
 int sandbox_fs_size(const char *filename)
 {
-	return os_get_filesize(filename);
+	loff_t size;
+	int ret;
+
+	ret = os_get_filesize(filename, &size);
+	if (ret)
+		return ret;
+	else
+		return size;
 }
 
 void sandbox_fs_close(void)
@@ -91,26 +121,28 @@
 
 int fs_read_sandbox(const char *filename, void *buf, int offset, int len)
 {
-	int len_read;
+	int ret;
+	loff_t actread;
 
-	len_read = sandbox_fs_read_at(filename, offset, buf, len);
-	if (len_read == -1) {
+	ret = sandbox_fs_read_at(filename, offset, buf, len, &actread);
+	if (ret) {
 		printf("** Unable to read file %s **\n", filename);
-		return -1;
+		return ret;
 	}
 
-	return len_read;
+	return actread;
 }
 
 int fs_write_sandbox(const char *filename, void *buf, int offset, int len)
 {
-	int len_written;
+	int ret;
+	loff_t actwrite;
 
-	len_written = sandbox_fs_write_at(filename, offset, buf, len);
-	if (len_written == -1) {
+	ret = sandbox_fs_write_at(filename, offset, buf, len, &actwrite);
+	if (ret) {
 		printf("** Unable to write file %s **\n", filename);
-		return -1;
+		return ret;
 	}
 
-	return len_written;
+	return actwrite;
 }
diff --git a/include/os.h b/include/os.h
index 0230a7f..e3645e0 100644
--- a/include/os.h
+++ b/include/os.h
@@ -217,9 +217,10 @@
  * Get the size of a file
  *
  * @param fname		Filename to check
- * @return size of file, or -1 if an error ocurred
+ * @param size		size of file is returned if no error
+ * @return 0 on success or -1 if an error ocurred
  */
-ssize_t os_get_filesize(const char *fname);
+int os_get_filesize(const char *fname, loff_t *size);
 
 /**
  * Write a character to the controlling OS terminal
diff --git a/include/sandboxfs.h b/include/sandboxfs.h
index e7c3262..8e5da6b 100644
--- a/include/sandboxfs.h
+++ b/include/sandboxfs.h
@@ -20,8 +20,10 @@
 
 int sandbox_fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info);
 
-long sandbox_fs_read_at(const char *filename, unsigned long pos,
-			     void *buffer, unsigned long maxsize);
+int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,
+		       loff_t maxsize, loff_t *actread);
+int sandbox_fs_write_at(const char *filename, loff_t pos, void *buffer,
+			loff_t maxsize, loff_t *actwrite);
 
 void sandbox_fs_close(void);
 int sandbox_fs_ls(const char *dirname);
